<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理</title>

    <script src="__STATIC__/jquery-2.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
    <script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    {include file="public/header" /}
    {include file="public/left" /}
    <style>
        .layui-table-cell{
            height: 33px;
        }
    </style>



    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <fieldset class="layui-elem-field layui-field-title"  style="margin-top: 50px;">
                <legend>汇总数据</legend>
            </fieldset>

            <form class="layui-form layui-form-pane" action="#" method="post">

                （选择历史日期查询）
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">查询日期</label>
                            <div class="layui-input-inline">
                                <input type="text" name="date" value="{$date}" class="layui-input" id="date" placeholder="yyyy-MM-dd">
                            </div>
                        </div>

                    </div>



               <!-- <div class="layui-form-item">
                    <label class="layui-form-label">日期</label>
                    <div class="layui-input-inline">
                        <input type="date" name="date" value="{$date}"  id="date"  class="layui-input">
                    </div>
                </div>-->






                <div class="layui-collapse">
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">用户信息</h2>
                        <div class="layui-colla-content layui-show">
                            <div class="layui-form-item">
                                <label class="layui-form-label">用户id</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="uid" value="{$u.uid}" disabled   class="layui-input">

                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">用户姓名</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="username" value="{$u.username}"    class="layui-input">

                                </div>
                            </div>


                        </div>
                    </div>


                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">当天胰岛素使用情况 胰岛素用量（u）</h2>
                        <div class="layui-colla-content layui-show">
                            胰岛素总量:{$insulin.insulindate}
                            <hr>
                            基础量总量:{$insulin.baseinsulindate}
                            <hr>
                            餐前大剂量总量:{$insulin.beforeeatinsulindate}
                            <hr>



                        </div>
                    </div>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">临时剂量输注时间 胰岛素用量（u）</h2>
                        <div class="layui-colla-content layui-show">
                            用量  （u）   ： 时间
                            <hr>
                            {volist name="insulin.temporaryinsulinlistdate" id="ti"}
                            {$ti.itemname}:  {$ti.value|default="空"} : {$ti.date|default="空"}
                            <hr>
                            {/volist}
                            临时剂量总量  ： {$insulin.temporaryinsulindate}

                        </div>
                    </div>
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">血糖监测时间段  血糖（mmol/L）</h2>
                        <div class="layui-colla-content layui-show">
                            用量  （u）   ： 时间
                            <hr>
                            {volist name="bs" id="b"}
                            {$b.itemname}   :  {$b.value|default="空"} : {$b.date|default="空"}
                            <hr>
                            {/volist}

                        </div>
                    </div>
                </div>







               <!-- <div class="layui-form-item">
                    <button class="layui-btn" lay-submit="" lay-filter="demo2">提交</button>
                </div>-->
            </form>


        </div>
    </div>


</div>

<script>

    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });




    $('#logout').click(function (e) {
        e.preventDefault();
        layui.use('layer', function(){
            var layer = layui.layer;

            layer.confirm('你真的要退出吗？',['yes','no'],function () {
                location.href="{:url('login/logout')}";
            },function () {
                
            })
        });
    })


</script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
                ,layer = layui.layer
                ,layedit = layui.layedit
                ,laydate = layui.laydate;

        //常规用法
        laydate.render({
            elem: '#date',
            done:function (value, date) {
                location.href = "{:url('treat/history',array('uid'=>$u['uid']))}?date="+value;
            }
        });





        //监听提交
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });


    });
</script>




</body>
</html>